/**
 * @file    drv_gpio_pcfg.h
 * @brief   引脚定义
 * @author  Liuwei
 * @version 1.0.1
 * @date    2023-04-17
 * 
 * @copyright Copyright (c) 2023 JBD-Energy Storage Technology Co. LTD
 * 
 * @par 修改日志:
 * <table>
 * <tr><th>Date       <th>Version   <th>Author   <th>Description
 * <tr><td>2023-04-17 <td>1.0.1     <td>Liuwei   <td>首次创建
 * </table>
 */

#ifndef __DRV_GPIO_PCFG_H_
#define __DRV_GPIO_PCFG_H_

/* File Includes -------------------------------------------------------------*/

/* Cplusplus -----------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif

/* Macro/Define/Typedef ------------------------------------------------------*/
/** GPIOA */
#define LCD_UART_RX_PORT     PA 
#define LCD_UART_RX_PIN      BIT0
#define LCD_UART_TX_PORT     PA 
#define LCD_UART_TX_PIN      BIT1
#define LCD_POW_PORT         PA 
#define LCD_POW_PIN          BIT2
#define BL_POW_PORT          PA
#define BL_POW_PIN           BIT3
#define BL_RX_PORT           PA
#define BL_RX_PIN            BIT4
#define BL_TX_PORT           PA
#define BL_TX_PIN            BIT5
#define DCDC_EN_PORT         PA
#define DCDC_EN_PIN          BIT6
#define SYS_POW_PORT         PA
#define SYS_POW_PIN          BIT7
#define RS485_RX3_PORT       PA
#define RS485_RX3_PIN        BIT8
#define RS485_TX3_PORT       PA
#define RS485_TX3_PIN        BIT9
#define ADDR_DO_PORT         PA     
#define ADDR_DO_PIN          BIT10
#define ADDR_DI_PORT         PA 
#define ADDR_DI_PIN          BIT11
#define AFE_SPI_CS_PORT      PA
#define AFE_SPI_CS_PIN       BIT12
#define AFE_SPI_CLK_PORT     PA
#define AFE_SPI_CLK_PIN      BIT13
#define AFE_SPI_MISO_PORT    PA
#define AFE_SPI_MISO_PIN     BIT14
#define AFE_SPI_MOSI_PORT    PA
#define AFE_SPI_MOSI_PIN     BIT15

/** GPIOB */
#define SW_PORT              PB 
#define SW_PIN               BIT0
#define ADC_MIN_S_PORT       PB 
#define ADC_MIN_S_PIN        BIT1
#define CHG_SIGN_PORT        PB 
#define CHG_SIGN_PIN         BIT2
#define ADC_BATTV_PORT       PB
#define ADC_BATTV_PIN        BIT3
#define ADC_DSGC_PORT        PB
#define ADC_DSGC_PIN         BIT4
#define ADC_CHGC_PORT        PB
#define ADC_CHGC_PIN         BIT5
#define ADC_FANV_PORT        PB      
#define ADC_FANV_PIN         BIT6
#define ADC_FANI_PORT        PB      
#define ADC_FANI_PIN         BIT7
//#define ADC_TEMP3_PORT       PB      
//#define ADC_TEMP3_PIN        BIT8
//#define ADC_TEMP4_PORT       PB      
//#define ADC_TEMP4_PIN        BIT9
#define ADC_EVNT_PORT        PB
#define ADC_EVNT_PIN         BIT10
#define ADC_MOST_PORT        PB
#define ADC_MOST_PIN         BIT11
//#define ADC_PACKV_PORT       PB
//#define ADC_PACKV_PIN        BIT12
///#define  PB
//#define   BIT13
#define HARD_VER_PORT        PB
#define HARD_VER_PIN         BIT14
//#define SMP_POW_PORT         PB
//#define SMP_POW_PIN          BIT15

/** GPIOC */
#define RST_SING_PORT        PC 
#define RST_SING_PIN         BIT0 
#define SPRO_PORT            PC 
#define SPRO_PIN             BIT1 
#define HOT_MOS_PORT         PC 
#define HOT_MOS_PIN          BIT2
#define FAN_MOS_PORT         PC
#define FAN_MOS_PIN          BIT3
#define CAN_RES_PORT         PC
#define CAN_RES_PIN          BIT4
#define CHG_EN_PORT          PC
#define CHG_EN_PIN           BIT5
#define LOCK_ON_PORT         PC      
#define LOCK_ON_PIN          BIT6
#define MX_OF_EN_PORT        PC    
#define MX_OF_EN_PIN         BIT7 
#define RTC_SDA_PORT         PC     
#define RTC_SDA_PIN          BIT8
#define RS485_DE1_PORT       PC      
#define RS485_DE1_PIN        BIT9
#define RS485_DE2_PORT       PC
#define RS485_DE2_PIN        BIT10
#define RS485_RX2_PORT       PC
#define RS485_RX2_PIN        BIT11
#define RS485_TX2_PORT       PC
#define RS485_TX2_PIN        BIT12
#define CAN1_TX_PORT         PC
#define CAN1_TX_PIN          BIT13
#define RESEVER_PORT         PC
#define RESEVER_PIN          BIT14

/** GPIOD */
#define LOAD_PORT            PD 
#define LOAD_PIN             BIT8
#define LIMIT_10A_PORT       PD
#define LIMIT_10A_PIN        BIT9
#define RS232_RX_PORT        PD
#define RS232_RX_PIN         BIT10
#define RS232_TX_PORT        PD
#define RS232_TX_PIN         BIT11
#define CAN1_RX_PORT         PD      
#define CAN1_RX_PIN          BIT12
#define AFE_VCP_PORT          PD    
#define AFE_VCP_PIN           BIT13 
#define NTC_POW_PORT         PD    
#define NTC_POW_PIN          BIT14

/** GPIOE */
#define EEP_SDA_PORT         PE 
#define EEP_SDA_PIN          BIT0
#define EEP_SCL_PORT         PE 
#define EEP_SCL_PIN          BIT1
#define ADDR6_PORT           PE 
#define ADDR6_PIN            BIT2
#define ADDR5_PORT           PE 
#define ADDR5_PIN            BIT3
#define ADDR4_PORT           PE 
#define ADDR4_PIN            BIT4
#define ADDR3_PORT           PE 
#define ADDR3_PIN            BIT5
#define ADDR2_PORT           PE 
#define ADDR2_PIN            BIT6
#define ADDR1_PORT           PE 
#define ADDR1_PIN            BIT7
#define GPS_TX_PORT          PE 
#define GPS_TX_PIN           BIT8
#define GPS_RX_PORT          PE 
#define GPS_RX_PIN           BIT9
#define DI1_PORT             PE 
#define DI1_PIN              BIT10
#define DI2_PORT             PE 
#define DI2_PIN              BIT11
#define GPS_P_EN_PORT        PE 
#define GPS_P_EN_PIN         BIT12
#define RTC_SCL_PORT         PE 
#define RTC_SCL_PIN          BIT13
#define EXT_SIGN_PORT        PE 
#define EXT_SIGN_PIN         BIT14
#define HARD_WDG_PORT        PE 
#define HARD_WDG_PIN         BIT15

/** GPIOF */
#define WK_COM_PORT          PF 
#define WK_COM_PIN           BIT6
#define LIMIT_5A_PORT        PF 
#define LIMIT_5A_PIN         BIT7
#define LED_ALM_PORT         PF 
#define LED_ALM_PIN          BIT8
#define LED_RUN_PORT         PF 
#define LED_RUN_PIN          BIT9
#define LED_SOC5_PORT        PF 
#define LED_SOC5_PIN         BIT10
#define LED_SOC4_PORT        PF 
#define LED_SOC4_PIN         BIT11

/** GPIOG */
#define LED_SOC1_PORT        PG 
#define LED_SOC1_PIN         BIT2
#define LED_SOC2_PORT        PG 
#define LED_SOC2_PIN         BIT3
#define LED_SOC3_PORT        PG 
#define LED_SOC3_PIN         BIT4
#define FALSH_CS_PORT        PG 
#define FALSH_CS_PIN         BIT9
#define FALSH_SCK_PORT       PG 
#define FALSH_SCK_PIN        BIT10
#define FALSH_MISO_PORT      PG 
#define FALSH_MISO_PIN       BIT11
#define FALSH_MOSI_PORT      PG 
#define FALSH_MOSI_PIN       BIT12
#define PRE_CHG_PORT         PG 
#define PRE_CHG_PIN          BIT13
#define DSG_EN_PORT          PG 
#define DSG_EN_PIN          BIT14
#define AFE_SHDN_PORT        PG
#define AFE_SHDN_PIN         BIT15

/** GPIOH */
#define LED_SOC6_PORT        PH
#define LED_SOC6_PIN         BIT4
#define LED_MOS_PORT         PH
#define LED_MOS_PIN          BIT5
#define SYS_RLED_PORT        PH
#define SYS_RLED_PIN         BIT6
#define RS485_DE3_PORT       PH
#define RS485_DE3_PIN        BIT7
#define RLY_SOCL_PORT        PH
#define RLY_SOCL_PIN         BIT8
#define RLY_PORT_PORT        PH
#define RLY_PORT_PIN         BIT9
//#define POW_SIGN_PORT        PH
//#define POW_SIGN_PIN         BIT10 
#define BAT_SMP_EN_PORT      PH
#define BAT_SMP_EN_PIN       BIT11

/* @brief */

/* Variables -----------------------------------------------------------------*/

/*******************************************************************************
 * public API List
 ******************************************************************************/

#ifdef __cplusplus
}
#endif

#endif  /* #ifndef __DRV_GPIO_PCFG_H_ */
/********** Copyright (c) 2023 JBD-Energy Storage Technology Co. LTD *********/



